<form id="pagerForm" method="post" action="{:url('Bill/exhibition')}">
	<input type="hidden" name="pageNum" value="{$pageNum|default=''}"/>
	<input type="hidden" name="numPerPage" value="{$numPerPage|default=''}"/>
	<input type="hidden" name="order_sn" value="{$order_sn|default=''}"/>
	<input type="hidden" name="start_time" value="{$start_time|default=''}"/>
	<input type="hidden" name="end_time" value="{$end_time|default=''}"/>
	<input type="hidden" name="cid" value="{$cid|default=''}"/>
</form>
<style>
	input[name="ids"]{
		height: 22px;
		width: 13px;
	}
	input.checkboxCtrl{
		height: 13px;
		width: 20px;
		margin-top: 3px;
	}
</style>
<div class="pageHeader">
	<form onsubmit="return navTabSearch(this);" action="{:url('Bill/exhibition')}" method="post">
		<input type="hidden" name="cid" readonly="true" value="{$cid}"/>
		<div class="searchBar">
			<table class="searchContent">
				<tr>
					<td>订单编号：<input name="order_sn" size="25" type="text" value="{$order_sn|default=''}"/></td>
					<td>是否已结算：</td>
					<td>
						<select class="combox" name="is_distribut">
							<option value="-1" {if condition="$is_distribut eq -1"}selected="selected"{/if}>全部</option>
							<option value="0" {if condition="$is_distribut eq 0"}selected="selected"{/if}>未结算</option>
							<option value="1" {if condition="$is_distribut eq 1"}selected="selected"{/if}>已结算</option>
						</select>
					</td>
					<td>开始时间（订单完成）：<input name="start_time" type="text" class="date" datefmt="yyyy-MM-dd" readonly="true" value="{$start_time|default=''}"></td>
					<td>结束时间（订单完成）：<input name="end_time" type="text" class="date" datefmt="yyyy-MM-dd" readonly="true" value="{$end_time|default=''}"></td>
				</tr>
			</table>
			<div class="subBar">
				<ul>
					<li>
						<div class="buttonActive">
							<div class="buttonContent">
								<button type="submit" style="height: 27px;">检索</button>
							</div>

						</div>
						<div class="buttonActive" style="margin-left: 5px;">
							<div class="buttonContent">
								<a title="确定要结算选中项吗?" style="height: 100%;line-height: 25px;text-decoration: none;" target="selectedTodo" rel="ids" postType="string" href="{:url('Bill/jsAll')}" class="delete">批量结算</a>
							</div>
						</div>
					</li>
				</ul>
			</div>
		</div>
	</form>
</div>
<div class="pageContent">
	<table class="list" width="101.8%" layoutH="86">
		<thead>
			<tr>
				<th colspan="5" style="color: blue;">合计：</th>
				<th colspan="4" style="color: green;"><strong style="color: red">{$price}</strong> 元</th>
			</tr>
			<tr>
				<th width="7%"><input type="checkbox" group="ids" class="checkboxCtrl"></th>
				<th width="15%">订单编号</th>
                                <th width="10%">完成时间</th>
                                <th width="10%">结算时间</th>
				<th width="10%">预约时间</th>
				<th width="6%">是否已结算</th>
				<th width="6%">订单状态</th>
				<th width="6%">订单总价</th>
				<th width="10%">操作</th>
			</tr>
		</thead>
		<tbody>
			{volist name="list" id="val" key="i"}
			<!--<tr></tr>-->
			<tr>
				<td>{eq name="$val.is_distribut" value="0"}<input type="checkbox" name="ids" value="{$val.order_id}">{else/}<span style="display:inline-block;margin-top: 5px;color: green;">✔</span>{/eq}</td>
				<td class="o-num">{$val.order_sn}</td>
                                <td>{$val.finish_time|date='Y-m-d H:i:s',###}</td>
                                <td>
                                    {notempty name="val.distribut_time"}
                                    {$val.distribut_time|date='Y-m-d H:i:s',###}
                                    {else /}

                                    {/notempty}
                                </td>
				<td>{$val.subscribe_date|date='Y-m-d',###}</td>
				<td>
					{if condition="$val.is_distribut eq 0"}未结算
					{elseif condition="$val.is_distribut eq 1"}已结算
					{/if}
				</td>
				<td>
					{if condition="$val.order_status eq 0"}未付款
					{elseif condition="$val.order_status eq 2"}待检车
					{elseif condition="$val.order_status eq 3"}已完成
					{elseif condition="$val.order_status eq 4"}已取消
					{/if}
				</td>
				<td>{$val.total_amount}</td>
				<td class="oper">
					<a rel="order_see" class="detail_see" href="{:url('Bill/detail')}?id={$val.order_id}" target='navTab' title="详情" mask="true" style="color:#000;">查看</a>
					{if condition="$val.is_distribut eq 0"}
					<a rel="order_js" class="order_js" href="{:url('Bill/billjs')}?id={$val.order_id}" target='ajaxTodo' title="确定要结算吗？"><span style="color: red;">结算</span></a>
					{/if}
				</td>
			</tr>
			{/volist}
		</tbody>
	</table>
	<div class="panelBar">
		<div class="pages">
			<span>共{$count}条</span>
		</div>
		<div class="pagination" targetType="navTab" totalCount="{$count}" numPerPage="{$numPerPage}" pageNumShown="10"
		currentPage="{$pageNum}"></div>
	</div>
</div>